
from django.urls import path
from . import dashboard_api

urlpatterns = [
    path('api/dashboard/data/', dashboard_api.get_dashboard_data, name='dashboard_data'),
    path('api/dashboard/overview/', dashboard_api.get_host_overview, name='host_overview'),

    # 新的高效API端点
    path('host-groups/', dashboard_api.get_host_groups, name='host_groups'),
    path('host-groups/<str:group_id>/hosts/', dashboard_api.get_hosts_by_group, name='hosts_by_group'),
    path('hosts/<str:host_id>/latest-data/', dashboard_api.get_host_latest_data, name='host_latest_data'),
    path('hosts/<str:host_id>/graphs/', dashboard_api.get_host_graphs, name='host_graphs'),
    path('items/history/', dashboard_api.get_item_history, name='item_history'),
]
